home *** CD-ROM | disk | FTP | other *** search
- ELF_RAWFILE(3E) Last changed: 10-13-98
-
-
- NNAAMMEE
- eellff__rraawwffiillee - Retrieves uninterpreted file contents
-
- SSYYNNOOPPSSIISS
- cccc [_f_l_a_g ...] _f_i_l_e ... --lleellff [_l_i_b_r_a_r_y ...]
-
- ##iinncclluuddee <<lliibbeellff..hh>>
-
- cchhaarr **eellff__rraawwffiillee((EEllff **eellff,, ssiizzee__tt **ppttrr));;
-
- ##ddeeffiinnee __LLIIBBEELLFF__XXTTNNDD__6644
-
- cchhaarr **eellff__rraawwffiillee((EEllff **eellff,, EEllff6644__XXwwoorrdd **ppttrr));;
-
- IIMMPPLLEEMMEENNTTAATTIIOONN
- IRIX systems
-
- DDEESSCCRRIIPPTTIIOONN
- eellff__rraawwffiillee returns a pointer to an uninterpreted byte image of the
- file. This function should be used only to retrieve a file being
- read. For example, a program might use eellff__rraawwffiillee to retrieve the
- bytes for an archive member.
-
- A program may not close or disable [see eellff__ccnnttll(3E)] the file
- descriptor associated with eellff before the initial call to eellff__rraawwffiillee,
- because eellff__rraawwffiillee might have to read the data from the file if it
- does not already have the original bytes in memory. Generally, this
- function is more efficient for unknown file types than for object
- files. The library implicitly translates object files in memory,
- while it leaves unknown files unmodified. Thus, asking for the
- uninterpreted image of an object file may create a duplicate copy in
- memory.
-
- eellff__rraawwddaattaa [see eellff__ggeettddaattaa(3E)] is a related function, providing
- access to sections within a file.
-
- If ppttrr is non-null, the library also stores the file's size, in bytes,
- in the location to which ppttrr points. If no data are present, eellff is
- null, or an error occurs, the return value is a null pointer, with
- zero optionally stored through ppttrr.
-
- NNOOTTEESS
- A program that uses eellff__rraawwffiillee and that also interprets the same file
- as an object file, potentially has two copies of the bytes in memory.
- If such a program requests the raw image first, before it asks for
- translated information (through such functions as eellff__ggeetteehhddrr,
- eellff__ggeettddaattaa, and so on), the library ``freezes'' its original memory
- copy for the raw image. It then uses this frozen copy as the source
- for creating translated objects, without reading the file again.
- Consequently, the application should view the raw file image returned
- by eellff__rraawwffiillee as a read-only buffer, unless it wants to alter its own
- view of data subsequently translated. In any case, the application
- may alter the translated objects without changing bytes visible in the
- raw image.
-
- Multiple calls to eellff__rraawwffiillee with the same ELF descriptor return the
- same value; the library does not create duplicate copies of the file.
-
- The use of a ssiizzee__tt in a 32-bit compile with eellff__rraawwffiillee is
- unfortunate, since that makes it impossible to deal with certain
- object files. If, when the 32-bit application is compiled,
- __LLIIBBEELLFF__XXTTNNDD__6644 is defined, then the function interface changes to
- have 64-bit fields. If __LLIIBBEELLFF__XXTTNNDD__6644 is defined at compile-time,
- then instead of linking with --lleellff, link with --lleellff__xxttnndd. There is a
- corresponding --llddwwaarrff__xxttnndd. It is essential that a 32-bit application
- compiled with __LLIIBBEELLFF__XXTTNNDD__6644 be entirely compiled with
- __LLIIBBEELLFF__XXTTNNDD__6644 defined.
-
- Applications that are built as 64-bit applications can ignore
- __LLIIBBEELLFF__XXTTNNDD__6644; it has no effect on them and 64-bit applications
- always link with --lleellff, never with --lleellff__xxttnndd.
-
- SSEEEE AALLSSOO
- eellff(3E), eellff__bbeeggiinn(3E), eellff__ccnnttll(3E), eellff__ggeettddaattaa(3E),
- eellff__ggeetteehhddrr(3E), eellff__ggeettiiddeenntt(3E), eellff__kkiinndd(3E)
-
- This man page is available only online.
-
-